import React, { Component } from 'react'
import CartList from '../components/CartList';
import { connect } from 'react-redux';
import { MyTabbar } from '../components/MyTabbar';
export class Cart extends Component {
    render() {
        return (
            <div className="page">
                <div className="content">
                    <CartList {...this.props}></CartList>
                </div>
                <MyTabbar {...this.props}></MyTabbar>
            </div>
        )
    }
}


const mapStateToProps = (state) => {
    return {
        ...state
    }
}

const mapDispatchToProps = (dispatch) => {
    return {

        setList(data) {
            dispatch({ type: "SET_LIST", data: data })
        },
        selectAll(data) {
            dispatch({ type: "SELECT_ALL", data: data });
        }
       
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Cart)